package io.adrainty.bolee.insurance.repository;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.adrainty.bolee.insurance.models.entity.CoefficientEntity;

import java.util.List;

/**
 * <p>ICoefficientServiceRepository</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description CoefficientServiceRepository
 * @since 2025/8/11 10:23:26
 */
public interface ICoefficientRepository {

    /**
     * <p>分页获取保障系数</p>
     *
     * @param pageNum  页码
     * @param pageSize 页大小
     * @param searchDTO 查询条件
     * @return IPage<CoefficientEntity>
     */
    IPage<CoefficientEntity> findCoefficientPage(Integer pageNum, Integer pageSize, CoefficientEntity searchDTO);

    /**
     * <p>获取保障系数列表</p>
     *
     * @param entity 查询条件
     * @return List<CoefficientEntity>
     */
    List<CoefficientEntity> findCoefficientList(CoefficientEntity entity);

    /**
     * <p>创建保障系数</p>
     *
     * @param entity 保障系数
     * @return Boolean
     */
    boolean createCoefficient(CoefficientEntity entity);

    /**
     * <p>修改保障系数</p>
     *
     * @param entity 保障系数
     * @return Boolean
     */
    boolean updateCoefficient(CoefficientEntity entity);

    /**
     * <p>删除保障系数</p>
     *
     * @param deleteIdList 删除ID列表
     * @return Boolean
     */
    boolean deleteCoefficient(List<String> deleteIdList);

    /**
     * 通过系数项key获取系数项
     *
     * @param coefficientKey 系数项key
     * @return 系数项BO
     */
    CoefficientEntity findByCoefficientKey(String coefficientKey);

}
